cmake_minimum_required(VERSION 3.10)
project(cpp_kafka_example)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(PkgConfig REQUIRED)
pkg_check_modules(RDKAFKA REQUIRED IMPORTED_TARGET rdkafka++)

add_executable(producer kafka_producer.cpp)
target_link_libraries(producer PkgConfig::RDKAFKA)

add_executable(consumer kafka_consumer.cpp)
target_link_libraries(consumer PkgConfig::RDKAFKA)

